/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.restaurant.domain;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author root
 */
@Entity
@Table(name = "employeeshift")
@XmlRootElement(name = "employeeshift")
@NamedQueries({
    @NamedQuery(name = "Employeeshift.findAll", query = "SELECT e FROM Employeeshift e"),
    @NamedQuery(name = "Employeeshift.findByEmployeeshiftID", query = "SELECT e FROM Employeeshift e WHERE e.employeeshiftID = :employeeshiftID"),
    @NamedQuery(name = "Employeeshift.findByShiftdescription", query = "SELECT e FROM Employeeshift e WHERE e.shiftdescription = :shiftdescription"),
    @NamedQuery(name = "Employeeshift.findByCheckintime", query = "SELECT e FROM Employeeshift e WHERE e.checkintime = :checkintime"),
    @NamedQuery(name = "Employeeshift.findByCheckouttime", query = "SELECT e FROM Employeeshift e WHERE e.checkouttime = :checkouttime"),
    @NamedQuery(name = "Employeeshift.findByIsdeleted", query = "SELECT e FROM Employeeshift e WHERE e.isdeleted = :isdeleted")})
public class Employeeshift implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "EmployeeshiftID")
    private Long employeeshiftID;
    @Column(name = "shiftdescription")
    private String shiftdescription;
    @Column(name = "checkintime")
    private Integer checkintime;
    @Column(name = "checkouttime")
    private Integer checkouttime;
    @Column(name = "isdeleted")
    private Boolean isdeleted;
    @JoinColumn(name = "employee_EmployeeID", referencedColumnName = "EmployeeID")
    @ManyToOne(optional = false)
    private Employee employee;

    public Employeeshift() {
    }

    public Employeeshift(Long employeeshiftID) {
        this.employeeshiftID = employeeshiftID;
    }

    public Long getEmployeeshiftID() {
        return employeeshiftID;
    }

    public void setEmployeeshiftID(Long employeeshiftID) {
        this.employeeshiftID = employeeshiftID;
    }

    public String getShiftdescription() {
        return shiftdescription;
    }

    public void setShiftdescription(String shiftdescription) {
        this.shiftdescription = shiftdescription;
    }

    public Integer getCheckintime() {
        return checkintime;
    }

    public void setCheckintime(Integer checkintime) {
        this.checkintime = checkintime;
    }

    public Integer getCheckouttime() {
        return checkouttime;
    }

    public void setCheckouttime(Integer checkouttime) {
        this.checkouttime = checkouttime;
    }

    public Boolean getIsdeleted() {
        return isdeleted;
    }

    public void setIsdeleted(Boolean isdeleted) {
        this.isdeleted = isdeleted;
    }

    public Employee getEmployee() {
        return employee;
    }

    public void setEmployee(Employee employee) {
        this.employee = employee;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (employeeshiftID != null ? employeeshiftID.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Employeeshift)) {
            return false;
        }
        Employeeshift other = (Employeeshift) object;
        if ((this.employeeshiftID == null && other.employeeshiftID != null) || (this.employeeshiftID != null && !this.employeeshiftID.equals(other.employeeshiftID))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.restaurant.domain.Employeeshift[employeeshiftID=" + employeeshiftID + "]";
    }

}
